{namespace vh=In2code\Powermail\ViewHelpers}

<div class="powermail_fieldwrap powermail_fieldwrap_type_file powermail_fieldwrap_{field.marker} {field.css} {settings.styles.framework.fieldAndLabelWrappingClasses}">
	<label for="powermail_field_{field.marker}" class="{settings.styles.framework.labelClasses}" title="{field.description}">
		<vh:string.RawAndRemoveXss>{field.title}</vh:string.RawAndRemoveXss><f:if condition="{field.mandatory}"><span class="mandatory">*</span></f:if>
	</label>

	<div class="{settings.styles.framework.fieldWrappingClasses}">
		<vh:Form.MultiUpload
				id="powermail_field_{field.marker}"
				property="{field.marker}"
				additionalAttributes="{vh:Validation.UploadAttributes(field:field)}"
				class="powermail_file {vh:Validation.ErrorClass(field:field, class: 'powermail_field_error')}" />

		<f:if condition="{vh:Misc.PrefillField(field:field, mail:mail)}">
			<ul class="powermail_fieldwrap_file_list">
				<f:for each="{vh:Misc.PrefillField(field:field, mail:mail)}" as="file">
					<li>
						<span class="fileName">{file}</span>
						<f:form.hidden property="{field.marker}." value="{file}" />
					</li>
				</f:for>
				<li>
					<span class="deleteAllFiles"><f:translate key="deleteAllFiles">Delete All Files</f:translate></span>
				</li>
			</ul>
		</f:if>
	</div>
</div>
